package cn.edu.zhku.citrusmonitor.baseinfo.citrus.service;

import java.util.List;

import cn.edu.zhku.citrusmonitor.baseinfo.citrus.exception.CitrusException;
import cn.edu.zhku.citrusmonitor.baseinfo.technology.exception.TechnologyException;
import cn.edu.zhku.citrusmonitor.domain.Bean;
import cn.edu.zhku.citrusmonitor.domain.TbCitrus;
import cn.edu.zhku.citrusmonitor.util.PageBean;

public interface CitrusService {
	/**
	 * 添加柑橘信息
	 * @param citrus
	 * @return
	 */
	boolean addCitrus(TbCitrus citrus) throws CitrusException;
	/**
	 * 删除柑橘信息
	 * @param citrusId
	 * @return
	 */
	boolean removeCitrus(String citrusId) throws CitrusException;
	/**
	 * 修改柑橘信息
	 * @param citrus
	 * @return
	 */
	boolean modifyCitrus(TbCitrus citrus) throws CitrusException;
	/**
	 * 根据唯一标识查询柑橘信息，返回TbCitrus类
	 * @param citrusId
	 * @return
	 */
	TbCitrus findCitrusById(String citrusId) throws CitrusException;
	/**
	 * 根据名称查询相似信息
	 * @param citrusName
	 * @return
	 */
	PageBean<TbCitrus> findCitrusByNameLike(int pageSize, int currentPage, String citrusName)throws CitrusException;
	/**
	 * 设置柑橘的推荐技术
	 * @param citrusId
	 * @param technologyId
	 * @return
	 */
	boolean setCitrusTnlg(String citrusId, String technologyId)throws CitrusException;
	/**
	 * 分页查询所有，后台
	 * @return
	 */
	PageBean<TbCitrus> fySearchAll(int pageSize, int currentPage)throws CitrusException;
	/**
	 * 查找最新的前几条柑橘信息
	 * @param size
	 * @return
	 * @throws TechnologyException
	 */
	List<TbCitrus> findCitrusesLimit(int size) throws CitrusException;
	/**
	 * 分页查询所有，前台
	 * @param pageSize
	 * @param currentPage
	 * @return
	 * @throws CitrusException
	 */
	PageBean<Bean> findPageList(int pageSize, int currentPage) throws CitrusException;
	/**
	 * 根据唯一标识查询柑橘信息，返回Bean信息类
	 * @param citrusId
	 * @return
	 */
	Bean getCitrusById(String citrusId) throws CitrusException;
	/**
	 * 批量删除
	 * @param ids
	 * @return
	 * @throws CitrusException
	 */
	boolean removeCitrusesByIds(String[] ids) throws CitrusException;
}


